package com.hh.flow.enums;

/**
 * @description:  流程类型枚举
 * @author minliuhua
 * @date: 2023/3/31 12:16
 */
public enum FlowType {
	/** 请假流程 */
	TEST_LEAVE("leaveFlow","请假流程");

	private String key;
	private String value;

	FlowType(String key, String value)
	{
		this.key = key;
		this.value = value;
	}

	public String getKey()
	{
		return key;
	}

	public String getValue()
	{
		return value;
	}

	public static String getKeyByValue(String value)
	{
		for (FlowType item : FlowType.values())
		{
			if (item.getValue().equals(value))
			{
				return item.getKey();
			}
		}
		return null;
	}

	public static String getValueByKey(String key)
	{
		for (FlowType item : FlowType.values())
		{
			if (item.getKey().equals(key))
			{
				return item.getValue();
			}
		}
		return null;
	}
}
